<template>
	<div>
		<!-- <NavTabs :tabs="navTagList" v-model="activeTag"></NavTabs> -->
		<div class="config-content">
			<div class="report" :style="{width:nowRowData.approvalStatus ==1 || !nowRowData.approvalStatus?'100%':'65%'}">
				<ApplyReport v-if="activeTag == 2" v-bind="$attrs" :approvalStatus="nowRowData.approvalStatus" :isDetail="(nowRowData.approvalStatus !=1 && nowRowData.approvalStatus !=-1) && nowRowData.approvalStatus !== undefined" :list="nowRowData.tableRel" :params="params" :nowRowData="nowRowData"></ApplyReport>
				<MaterialForm v-else-if="activeTag == 3"  v-bind="$attrs"  :approvalStatus="nowRowData.approvalStatus" :isDetail="(nowRowData.approvalStatus !=1 && nowRowData.approvalStatus !=-1) && nowRowData.approvalStatus !== undefined" :list="nowRowData.materialRel" :params="params" :applyNo="nowRowData.applyNo" :nowRowData="nowRowData"></MaterialForm>
				<ApplyReport v-else-if="activeTag == 4" v-bind="$attrs"  :approvalStatus="nowRowData.approvalStatus" :isDetail="(nowRowData.approvalStatus !=1 && nowRowData.approvalStatus !=-1) && nowRowData.approvalStatus !== undefined"  :list="nowRowData.dataRel" :params="params" :nowRowData="nowRowData"></ApplyReport>
			</div>
			<slot></slot>
		</div>
	</div>
</template>

<script setup lang="ts">
import ApplyReport from '@/views/instOperate/components/ApplyReport/index.vue'
import MaterialForm from '@/views/instOperate/components/MaterialForm/index.vue'
import NavTabs from '@/views/instOperate/components/NavTabs/index.vue'
import { getStore } from '@/utils/store'

const props = defineProps<{
	nowRowData: any
}>()

const userInfo = getStore('userInfo') || {}
const activeTag = ref(2)
const params = ref({
	belongDate: props.nowRowData.belongDate,
	subsidyProjectId: props.nowRowData.subsidyProjectId,
	organizationId: userInfo.organizationId,
})

const navTagList = [
	{ label: '机构填报内容（申请表）', value: 2 },
	{ label: '机构填报内容（床位审核表）', value: 4 },
	{ label: '机构申请需要上传的材料', value: 3 },
]
</script>

<style scoped lang="scss">
.config-content {
	padding: 12px;
	margin-top: 20px;
	border: 1px solid #dcdcdc;
	border-radius: 10px;
  display: flex;
  .report {
    width: 70%;
  }
}
</style>
